using System;
using System.Collections.Generic;
using Stats;
using UnityEngine;

namespace Entities
{
	public class Fighter : Entity
	{
		protected Stat mana;
		
		protected Stat ms;
		
		protected Stat level;
		
		protected Stat exp;
		
		//stats offensives
		protected Stat atk;
		protected Stat pow;
		protected Stat acc;
		protected Stat ind;
		protected Stat eff;
		
		//autres stats offensives
		
		
		//----
		
		List<Buff> appliedBuffs;
		List<Buff> enduredBuffs;
		
		List<Invocation> controlledInvocations;
		
		
		protected CombatMode mode;
		
		protected int comboLimit;
		
		protected GameObject gameObject;
		
		public void setGameObject(GameObject obj){
			gameObject = obj;	
		}
		
		public GameObject getGameObject(){
			return gameObject;	
		}
		
		public float distance(Fighter other){
			Vector2 pos = new Vector2(gameObject.transform.position.x, gameObject.transform.position.z);
			Vector2 pos2 = new Vector2(other.gameObject.transform.position.x, other.gameObject.transform.position.z);
			return Vector2.Distance(pos, pos2);
		}
		
		public Fighter ()
		{
		}
		
		public int getComboLimit(){
			return comboLimit;	
		}
		
		public void setLevel(int lvl){
			level = new Stat(StatType.level, lvl);
		}
		
		public void addLevel(int lvl){
			level.Val += lvl;
		}
	}
}

